package com.wlk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wlk.pojo.Department;
import com.wlk.pojo.dto.DepUserDTO;
import com.wlk.pojo.dto.ProSelectDepDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DepartmentMapper extends BaseMapper<Department> {
    Integer addDep(Department department);
    Integer updateDepIsDetailedByParentCodeSetZero(String parentCode);
    Integer updateDepIsDetailedByParentCodeSetOne(String parentCode);
    Integer isExist(@Param("depCode") String depCode);
    Integer delDepByDepCode(@Param("depCode")String depCode);
    Integer getIsDetailedByDepCode(@Param("depCode")String depCode);
    Integer checkSameLevelNodeByParentCode(@Param("likeParentDepCode")String likeParentDepCode,@Param("depLevel")Integer depLevel);
    String getDepCodeByDepId(@Param("depId")Integer depId);
    Integer updateDep(Department department);
    List<ProSelectDepDTO> getDepListForPro();
    List<DepUserDTO> getDepUserList();
}
